package com.tianlu.store.mapper;
 
import com.tianlu.store.entity.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import com.tianlu.store.common.MyBaseMapper;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Author 梁东烂  
 * @Desc 用户表(TUserInfo)表数据库访问层
 * @Date 2023-04-01 17:36:49
 */
@Mapper
public interface UserInfoMapper extends MyBaseMapper<UserInfo> {
    /**
     * 修改余额
     *
     * @param id    用户id
     * @param score 积分余额
     * @author liangdl
     * @since 2023/4/4 10:37
     */
    void updateScore(Long id, BigDecimal score);

    List<UserInfo> findGroupTree(Long id);

    UserInfo getByPhone(String phone);

    UserInfo getByOpenId(String openId);

    List<UserInfo> findByIds(String ids);

    List<Long> findTeamMembers(Serializable id);

    void resettingFreeFlag();

    UserInfo getByCode(String code);

    List<UserInfo> findTeamMemberList(Long id);

    String getMaxCode();
}
